package com.googlecode.afdbaccess.web.common.exception;

public class GuiLayerJsonFormattedException extends GuiLayerException {
    private String jsonStringPart = null;
    
    public GuiLayerJsonFormattedException(String message, String longMessage, String jsonStringPart, Throwable cause) {
        super(message, longMessage, cause);
        this.jsonStringPart = jsonStringPart;
    }
    
    public GuiLayerJsonFormattedException(String message, String longMessage, String jsonStringPart) {
        super(message, longMessage);
        this.jsonStringPart = jsonStringPart;
    }
    
    //
    
    public String getJsonStringPart() {
        return jsonStringPart;
    }
    
    //
    
    @Override
    public String toString() {
        return super.toString() +
          ((getJsonStringPart() != null)?"\njsonStringPart:\n" + getJsonStringPart() : "");
    }
}
